﻿using System.Collections.Generic;

namespace OpenCompiler.AST
{
	public class GlobalStatement : Statement<GlobalStatement>
	{
		public GlobalStatement(Statement parent)
			: base(parent)
		{
			this.Types = new TypeCollectionStatement(this);
			this.Usings = new List<UsingStatement>();
		}

		public List<UsingStatement> Usings { get; private set; }
		public TypeCollectionStatement Types { get; private set; }

		public GlobalStatement Using(string name)
		{
			var us = new UsingStatement(this, name);
			this.Usings.Add(us);
			return this;
		}
	}
}
